<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/static/htm/head" %>
	<script type="text/javascript" src="static/js/jquery.Jcrop.min.js"></script>
	<link rel="stylesheet" href="static/css/jquery.Jcrop.css" type="text/css">
	<title>修改头像</title>
	<script type="text/javascript">
		$(document).ready(function(){
			var state = 0;
			$("#pic").change(function(){
				//类型检查
				state = 1;
			});
			$("#submit").click(function(){
				if(state == 0) {
					alert("请先选择图片");
					return false;
				}
			});
	    });
	</script>
</head>
<body style="font-size:15px;">
		<div style="text-align: center;">
			<a href="index.jsp">
				<img alt="论坛Logo" height="56" src="static/pic/logo.jpg" width="192">
			</a>
		</div>
		<table width="100%">
			<tr>
				<td>
					<a href="index.jsp">
						返回首页
					</a>
			</td>
			<td style="text-align: right;">
					<%@ include file="/static/htm/user.jsp"%>
				</td>
			</tr>
		</table>
		<div style="position:relative;width:50%;left:25%;border: solid 1px #0B85FF;min-height:300px;">
			<form action="permit/modifyavatar" method="post" enctype="multipart/form-data" name="form1">
				<table width="100%">
					<tr>
						<td width="50%" align="center">
							<input type="file" name="file" id="pic" accept="image/gif,image/jpeg,image/png"/>
						</td>
						<td width="50%" align="center">
							<input type="submit" id="submit" class="btn btn-success" value="上传图片"> 
						</td>
					</tr>
				</table>

			</form>
		</div>
</body>
</html>